import { winRece } from './newLottery'
import request from '@/utils/request'

const mockApi = 'https://console-mock.apipost.cn/app/mock/project/79ea3b05-05f2-4f42-b40d-3d7f56281f27'

export const isChoose = () => {
  return request({
    url: '/scrm-api/console/market/lottery/is_choose',
    method: 'GET'
  })
}

export const getList = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/list',
    method: 'POST',
    data
  })
}

export const changeStatus = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/change',
    method: 'POST',
    data
  })
}

export const dele = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/del',
    method: 'POST',
    data
  })
}

export const download = (data: {}) => {
  return request({
    url: 'scrm-api/console/market/lottery/template',
    method: 'POST',
    data
  })
}

export const getMinApp = () => {
  return request({
    url: '/scrm-api/console/market/lottery/get-miniapp',
    method: 'GET'
  })
}

export const setConfig = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/set-miniapp',
    method: 'POST',
    data
  })
}

export const setPublic = (data: {}) => {
  return request({
    url: 'scrm-api/console/market/lottery/set-official-account',
    method: 'POST',
    data
  })
}

export const baseInfo = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/stat-base',
    method: 'GET',
    params: data
  })
}

export const totalData = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/stat-info',
    method: 'POST',
    data
  })
}

export const census = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/trend_chart',
    method: 'POST',
    data
  })
}

export const preData = (data: any) => {
  return request({
    url: '/scrm-api/console/market/lottery/participate-chart ',
    method: 'POST',
    data
  })
}

export const win = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/win-record',
    method: 'POST',
    data
  })
}

export const update = (data: any) => {
  return request({
    url: '/scrm-api/console/market/lottery/update-blacklist',
    method: 'POST',
    data
  })
}

export const winReceive = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/win-receive',
    method: 'POST',
    data
  })
}

export const winRecord = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/export/win-record',
    method: 'POST',
    data
  })
}

export const assistRecord = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/export/assist-record',
    method: 'POST',
    data
  })
}

export const prizeRecord = (data: any) => {
  return request({
    url: '/scrm-api/console/market/lottery/prize-record',
    method: 'POST',
    data
  })
}

export const assist = (data: {}) => {
  return request({
    url: '/scrm-api/console/market/lottery/assist-record',
    method: 'POST',
    data
  })
}
